package 比屋作业.day17;
import java.util.*;
public class D17_3 {
    public static void main(String[] args) {
        ArrayList<String> originallist=new ArrayList<>();
        originallist.add("北京");
        originallist.add("上海");
        originallist.add("广州");
        originallist.add("北京");
        originallist.add("深圳");
        originallist.add("上海");
        System.out.println("原始列表："+originallist);
        Set<String> uniqueSet =new LinkedHashSet<>(originallist);
        ArrayList<String>uniqueList=new ArrayList<>(uniqueSet);
        System.out.println("去除重复元素后的列表："+uniqueList);
    }
}
